package com.tiger.web.controller.oaInfo;

import com.tiger.common.core.controller.BaseController;
import com.tiger.common.core.domain.AjaxMapResult;
import com.tiger.common.core.domain.entity.SysUser;
import com.tiger.common.core.domain.model.LoginUser;
import com.tiger.common.utils.ServletUtils;
import com.tiger.common.utils.spring.SpringUtils;
import com.tiger.framework.web.service.TokenService;
import com.tiger.project.domain.ContractSponsor;
import com.tiger.project.service.IPeopleInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

/**
 * @Author bai
 * Date on 2023/2/3  15:12
 * Description:
 */
@Api(tags = "OA人员信息")
@RestController
@RequestMapping("/tiger/peopleInfo")
public class PeopleInfoController extends BaseController {
    @Autowired
    private IPeopleInfoService peopleInfoService;


    @ApiOperation(value = "修改人员OA")
    @PutMapping("/update")
    public AjaxMapResult update(@RequestBody SysUser user) throws IOException {
        return AjaxMapResult.success(peopleInfoService.updatePeople(user));
    }

    @ApiOperation(value = "停用人员OA")
    @GetMapping("/dead")
    public AjaxMapResult dead(String oaId,String token) throws IOException {
        return AjaxMapResult.success(peopleInfoService.deadPeople(oaId,token));
    }

}
